import { axios } from './request'

// seatmap修改操作
export function postseatmap (tpath, tactivename, tseatmap) { // 这个函数需要传参
  return axios({
    url: '/seatmap',
    method: 'POST',
    data: {
      'path': tpath,
      'activename': tactivename,
      'seatmap': tseatmap
    }
  })
}

// 获取当前剧院的全部信息
export function gettheaterinfo (path, hpath) {
  return axios({
    url: '/getTheaterInfo',
    method: 'GET',
    params: {
      theater: path,
      hallid: hpath
    }
  })
}

// theaterManage页面修改剧目信息请求
export function geteditshow (ctheater, cid) {
  return axios({
    url: '/editShow',
    method: 'GET',
    params: {
      path: ctheater,
      id: cid
    }
  })
}

// theaterManage页面删除剧目请求
export function getdeletShow (ctheater, cid, chall) {
  return axios({
    url: '/deletshow',
    method: 'GET',
    params: {
      path: ctheater,
      id: cid,
      hallid: chall
    }
  })
}

// theaterManage页面删除演出厅事件
export function postdeletehall (tpath, thallId) {
  return axios({
    url: '/deletehall',
    method: 'POST',
    data: {
      'path': tpath,
      'hallId': thallId
    }
  })
}

// theaterManage页面子组件addhalldialog的添加演出厅事件
export function postaddhall (tpath, thallinfo) {
  return axios({
    url: '/addhall',
    method: 'POST',
    data: {
      'path': tpath,
      'hallinfo': thallinfo
    }
  })
}

// theaterManage页面子组件editshowdialog的修改演出事件
export function posteditshow (showinfo) {
  return axios({
    url: '/edit',
    method: 'POST',
    data: showinfo
  })
}
